#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../../ && pwd )"
echo $DIR

ORIGIN_DIR="/data/deploy/go_final_url/"

cd $DIR/build &&
bash build.sh pre &&

rsync -avzr dist/go_final_url_linux_pre/ test:$ORIGIN_DIR

ssh test "cd $ORIGIN_DIR && bash restart.sh"